﻿@{
    ViewBag.Title = "新增岗位";
}
@model DotNet.Model.MyEntity.Base_Duty           
<script src="/Scripts/jQuery/jquery.validate.min.js" type="text/javascript"></script>
<script src="/Scripts/jQuery/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $("#form_Permission_Duty_CreateDuty").submit(function () {
            return false;
        });
    });   
</script>
<div class="pageContentD">
    @{Html.EnableClientValidation();}
    @using (Html.BeginForm("DutyCreating", "Duty", null, FormMethod.Post, new { onsubmit = "return validateCallback(this,dialogAdded_Permission_Duty);", @id = "form_Permission_Duty_CreateDuty", @class = "pageForm" }))
    {   
        <div class="pageFormContent" layouth="60">
            <table width="95%" class="tab01 tabNo">
                <tr>
                    <td class="td1" style="width:25%;">
                            名称：
                    </td>
                    <td>
                        @Html.TextBoxFor(m => m.Name, new Dictionary<string, object> { { "alt", "请输入名称" },{"class","input02"} })
                        @Html.ValidationMessageFor(m => m.Name)
                        <input name="ParentId" type="hidden" value='@ViewBag.ParentID' />
                    </td>
                </tr>
                <tr>
                    <td class="td1">
                            编号：
                    </td>
                    <td>
                        @Html.TextBoxFor(m => m.Code, new Dictionary<string, object> { { "class", "input02" } })
                        @Html.ValidationMessageFor(m => m.Code)
                    </td>
                </tr>
                <tr>
                    <td class="td1">
                    </td>
                    <td align="center">
                        <input type="checkbox" name="Enabled" id="Enabled" value="1"  @Html.Raw(Model == null || Model.Enabled == null ? "checked='checked'" : (Model.Enabled == 1 ? "checked='checked'" : "")) />有效
                        &nbsp;
                        <input type="checkbox" name="IsManage" id="IsManage" value='1' @Html.Raw(Model == null || Model.IsManage == null ? "value='0'" : (Model.IsManage == 1 ? "checked='checked'" : "")) />管理岗位
                    </td>
                </tr>
                <tr>
                    <td class="td1">
                            备 注：
                    </td>
                    <td>
                        @Html.TextAreaFor(m => m.Remark, new Dictionary<string, object> { { "class", "input02" } })
                    </td>
                </tr>
            </table>
        </div>
        <div class='formBar'>
            <ul>
                <li>
                    <button type="submit" class="btn btn-success btn-sm" id="btnSave_permission_duty_createDuty">
                        保存</button>
                </li>
                <li>
                    <button type="button" class="close btn btn-default btn-sm">
                        取消</button>
                </li>
            </ul>
        </div>
    }
</div>
